home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Mac OS USB DDK_v1.0.1 / Examples / PrinterClassDriver / PrinterClassDriver_SSW.make < prev    next >
Encoding:
Text File  |  1998-09-03  |  4.2 KB  |  155 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        PrinterClassDriver.make
  3. #
  4. #    Contains:    USB Printer Class Driver makefile
  5. #
  6. #    Version:    1.0d4
  7. #
  8.  
  9.  
  10. USB_PCD_Dir                =    {USBDrivers}PrinterClassDriver:
  11. USB_PCD_MakeFile        =    {USB_PCD_Dir}PrinterClassDriver_SSW.make
  12.  
  13. #
  14. #    include paths
  15. #
  16. PCD_Includes            =    -i {USB_PCD_Dir}            ∂
  17.                             -i {USBInterfacesInternal}    ∂
  18.                             -i {USBInterfacesExternal}
  19.  
  20. #
  21. #    symbol options
  22. #
  23. PCD_Sym                    =    -sym on
  24.  
  25. PrintDriverTarget        = {USBTargets}Drivers:USBPrintDriver
  26.         
  27. #
  28. #    compiler options
  29. #
  30.  
  31. PCD_PPC_COptions        =    {PCD_Includes} -align mac68k
  32. PCD_68K_C                =    SC
  33. PCD_68K_COptions        =    {PCD_Includes} -b
  34.  
  35.         
  36. #
  37. #    PPC and 68K objects
  38. #
  39. PCD_PPC_Objects            =    {ObjDir}PrinterClassDriver.c.x        ∂
  40.                             {ObjDir}PrintDriverShell.c.x        ∂
  41.                             {ObjDir}TradDriverLoaderLib.c.x        ∂
  42.                             {ObjDir}MissingLibraryRoutines.c.x
  43.  
  44. PCD_68K_Objects            =    {ObjDir}USB_Printer_DrvrGlue.a.o     ∂
  45.                             {ObjDir}USBPrint.c.o
  46.  
  47. PCD_LibsToLinkWith        =    {SharedLibraries}DriverServicesLib        ∂
  48.                             {SharedLibraries}NameRegistryLib        ∂
  49.                             {SharedLibraries}StdCLib                ∂
  50.                             {SharedLibraries}InterfaceLib             ∂
  51.                             {SharedLibraries}DriverLoaderLib        ∂
  52.                             {PPCLibraries}PPCCRuntime.o
  53.  
  54. PCD_LocalLibsToLinkWith    =    {StubLibsDir}USBServicesLib
  55.  
  56. # ••••••••••••••••••••••••••••• #
  57. #        Main build target        #
  58. # ••••••••••••••••••••••••••••• #
  59.  
  60. PrinterClassDriver    ƒƒ    {PrintDriverTarget}
  61.  
  62.  
  63. {PrintDriverTarget}    ƒƒ    {USBInterfacesInternal}PackageVersion.h        ∂
  64.                         {USB_PCD_Dir}PrinterClassVersion.h            ∂
  65.                         {USB_PCD_Dir}PrinterClassDriver.r
  66.     Rez    -a -o {Targ}                        ∂
  67.         -i {RIncludes}                        ∂
  68.         -i {USBInterfacesInternal}            ∂
  69.         {RIncludes}Types.r                    ∂
  70.         {USB_PCD_Dir}PrinterClassDriver.r
  71.         
  72. #
  73. #    legacy DRVR is compiled with 68K compiler
  74. #        and added into the USBPrintDriver file
  75. #
  76. {PrintDriverTarget} ƒƒ    {PCD_68K_Objects} {USB_PCD_Dir}PrinterClassVersion.h
  77.     Link    -o {Targ}  {PCD_Sym}  -d                ∂
  78.             {PCD_68K_Objects}                        ∂
  79.             -sg USBPrintDriver                        ∂
  80.             -rt 'DRVR=12'                            ∂
  81.             -ra USBPrintDriver=resSysHeap,resLocked
  82.  
  83.  
  84. #
  85. #    printer class driver is compiled with PPC compiler
  86. #        and added into the USBPrintDriver file
  87. #
  88. {PrintDriverTarget} ƒƒ    {PCD_PPC_Objects}                            ∂
  89.                         {PCD_LocalLibsToLinkWith}                    ∂
  90.                         {USBInterfacesInternal}USBClassDriver.exp
  91.     PPCLink -o {Targ}  -xm sharedlibrary  -t 'ndrv'  -c 'usbd'        ∂
  92.              -map {USBMapDir}USBPrinterDriver.map                    ∂
  93.             {PCD_PPC_Objects}                                         ∂
  94.             {PCD_LocalLibsToLinkWith}                                ∂
  95.             {PCD_LibsToLinkWith}                                    ∂
  96.              -init CFMInitialization                                    ∂
  97.             -@export {USBInterfacesInternal}USBClassDriver.exp        ∂
  98.             -share context  -w  -d  {PCD_Sym}
  99.  
  100. {USBReleaseExtensions}USBPrintDriver    ƒ    {PrintDriverTarget} 
  101.         duplicate -y {PrintDriverTarget}  {Targ}
  102.  
  103.  
  104. #
  105. #    printer class driver
  106. #
  107. {ObjDir}PrinterClassDriver.c.x        ƒ    {USB_PCD_Dir}PrinterClassDriver.c     ∂
  108.                                         {USBInterfacesExternal}USB.h        ∂
  109.                                            {USB_PCD_Dir}PrinterClassDriver.h
  110.     {USB_C_Compiler} -o {Targ} {StdMrCOpts} {PCD_PPC_COptions} {USB_PCD_Dir}PrinterClassDriver.c
  111.  
  112. #
  113. #    auxillary routines to load the DRVR into the unit table
  114. #
  115. {ObjDir}TradDriverLoaderLib.c.x        ƒ    {USB_PCD_Dir}TradDriverLoaderLib.c    ∂
  116.                                            {USB_PCD_Dir}TradDriverLoaderLib.h
  117.     {USB_C_Compiler} -o {Targ} {StdMrCOpts} {PCD_PPC_COptions} {USB_PCD_Dir}TradDriverLoaderLib.c
  118.  
  119. {ObjDir}MissingLibraryRoutines.c.x    ƒ    {USB_PCD_Dir}MissingLibraryRoutines.c
  120.     {USB_C_Compiler} -o {Targ} {StdMrCOpts} {PCD_PPC_COptions} {USB_PCD_Dir}MissingLibraryRoutines.c
  121.  
  122.  
  123. #
  124. #    printer class driver USB interfaces
  125. #
  126. {ObjDir}PrintDriverShell.c.x        ƒ    {USB_PCD_Dir}PrintDriverShell.c         ∂
  127.                                         {USBInterfacesInternal}PackageVersion.h    ∂
  128.                                          {USBInterfacesExternal}USB.h            ∂
  129.                                          {USB_PCD_Dir}PrinterClassDriver.h
  130.     {USB_C_Compiler} -o {Targ} {StdMrCOpts} {PCD_PPC_COptions} {USB_PCD_Dir}PrintDriverShell.c
  131.  
  132. #
  133. #    legacy DRVR system interface 68K asm
  134. #
  135. {ObjDir}USB_Printer_DrvrGlue.a.o    ƒ    {USB_PCD_Dir}DrvrGlue.a
  136.     Asm {USB_PCD_Dir}DrvrGlue.a -o {Targ} {StdAOptions}
  137.  
  138. #
  139. #    legacy DRVR implementation
  140. #
  141. {ObjDir}USBPrint.c.o                ƒ    {USB_PCD_Dir}USBPrint.c                ∂
  142.                                         {USB_PCD_Dir}PrinterClassDriver.h
  143.     {PCD_68K_C} -o {Targ} {PCD_68K_COptions} {USB_PCD_Dir}USBPrint.c
  144.  
  145.  
  146. #
  147. #    clean all the binaries before building
  148. #
  149. Clean_USB ƒƒ
  150.     Delete -i {PCD_PPC_Objects}
  151.     Delete -i {PCD_68K_Objects}
  152.     Delete -i {PrintDriverTarget} 
  153.  
  154. # eof
  155.